/*
 * File Find is the intial portion that asks for the input of listings.txt, 
 * and then puts the info into map/set for the other two (propertyParse, and agentAnalyze)
 */

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;
import java.util.TreeMap;
import java.util.Comparator;
import java.util.TreeSet;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
 *
 * @author Paul Pfaff (paul42@my.wgu.edu)
 */

public class fileFind {
    public TreeMap <Integer, property>  agents;
    public TreeSet properties;
    Comparator<property> comp = new comparator();

public void init() throws FileNotFoundException{
        try {
            Scanner console = new Scanner(System.in);
            System.out.print("Input file: ");
            String inputFileName = console.next();
            String tempString;
            BufferedReader input = new BufferedReader(new FileReader("listings.txt"));     
            
              agents = new TreeMap<Integer, property>(); //specially made treemap that has an INT as the key
              properties = new TreeSet(new comparator()); //generic treemap that calls the comparator
        
              
              while((tempString = input.readLine()) != null)//<editor-fold> 
                {
      //          int propertyNumber = input.nextInt();    
      //          String propertyType = input.next();
      //          double propertyValue = input.nextDouble();    
      //          int agentID = input.nextInt();
      //          input.nextLine();
      //          property propertyNew = new property(propertyNumber, propertyType.toUpperCase(), propertyValue, agentID);   
      //          agents.put(agentID, propertyNew);
      //          properties.add(propertyNew);
            } //</editor-fold> //reads input, makes objects, sticks them into maps
          
//              input.close();
            System.out.println("Reached end of fileFind");
        } // Starts up and finds the file to input, makes objects and sticks them into maps.
        catch (IOException ex) {
            Logger.getLogger(fileFind.class.getName()).log(Level.SEVERE, null, ex);
        }
        } // Starts up and finds the file to input, makes objects and sticks them into maps.
        
}// Starts up and finds the file to input, makes objects and sticks them into maps.

